<!--上传弹窗-->
<template>
    <el-dialog v-model="spiderForm.show" title="请选择爬虫站点" center append-to-body width="700px">
        <el-form label-width="80px">
            <el-form-item>
                <el-checkbox-group v-model="spiderForm.data.sites">
                    <el-checkbox label="dianping" size="large" border>大众</el-checkbox>
                    <el-checkbox label="ctrip" size="large" border>携程</el-checkbox>
                    <el-checkbox label="qunaer" size="large" border>去哪</el-checkbox>
                    <el-checkbox label="tongcheng" size="large" border>同程</el-checkbox>
                </el-checkbox-group>
            </el-form-item>

            <el-form-item>
                <div class="buttons">
                    <el-button type="primary" @click="commit">提交</el-button>
                </div>
            </el-form-item>
        </el-form>
    </el-dialog>
</template>

<script setup lang="ts">
import {defineProps} from 'vue'

const emit = defineEmits(["commit"])

const props = defineProps({
    spiderForm: {
        type   : Object,
        default: () => {
            return {
                show: false,
                data: {
                    gardenIds: [],
                    sites    : []
                },
            }
        }
    }
})


/**
 * 保存
 */
function commit() {
    props.spiderForm.show = false
    emit("commit")
}

</script>

<style lang="scss" scoped>
.buttons {
    width: 100%;
    display: flex;
    justify-content: end;
    align-items: end;
}
</style>

